package cn.itcast.fallback;

import cn.itcast.clients.RoomClients;
import cn.itcast.entity.Result;
import cn.itcast.entity.Room;
import feign.hystrix.FallbackFactory;
import org.springframework.web.bind.annotation.PathVariable;

public class RoomsClientFallBackFactory implements FallbackFactory<RoomClients> {
    @Override
    public RoomClients create(Throwable throwable) {
        return new RoomClients(){
            @Override
            public Result updateRoom(Room room) {
                return null;
            }
            @Override
            public Result<Integer> findIdByRoomNo(String roomNo) {
                return null;
            }
            @Override
            public Result<Room> findById(@PathVariable Long id){
                return null;
            }

            @Override
            public Result updateRoomByNumber(Room room) {
                return null;
            }
        };
    }
}
